var fun = {
    getLocationSearch(...params){
        let search = window.location.search
        search = search.substring(1)
        let searchParamsArr = search.split("&")
        let obj ={}
        searchParamsArr.forEach(x=>{
            let key = x.split("=")[0]
            let value = x.split("=")[1]
            if(key && value){
                obj[key] = value.toString()
            }
        })
        if(params.length>0){
            let parObj = {}
            for (const index in params) {
                let key = params[index]
                parObj[key] = obj[key]
            }
            return parObj
        }
        return obj
    }
}
export default{
    fun
}